{include file='comdir/head.html'}
<body>
<div class="content">
	<div class="animated fadeInDown">
		<div class="pos"><a href="#" onClick="javascript :history.back(-1);">返回上一页</a></div>
		<form class="form-horizontal" action="javascript:void(0)" id='frm'>
			<div class="form-group">
				<label class="col-sm-2 control-label">名称</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="name" value="">
				</div>
			</div>
			<div class="form-group img_show_hide1"  style="display:none" >
				<label class="col-sm-2 control-label">标题图片</label>
				<div class="col-sm-5">
					<img class="show_special" style="width:100px;height:30px;margin-bottom: 5px;" src="" /><br />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">标题图片</label>
				<div class="col-sm-5">
					<input type="hidden" value="" name="photourl" class="special">
					<div class="iframe-box btn-blue">
						<iframe id="upiframe" frameborder="0"  scrolling="no" src="{$_URL}Ups/upone?method=special&classname=special&callback=specialback"></iframe>
					</div>
				</div>
			</div>
			<div class="form-group img_show_hide2"  style="display:none" >
				<label class="col-sm-2 control-label">背景图片</label>
				<div class="col-sm-5">
					<img class="show_specialbg" style="width:100px;height:30px;margin-bottom: 5px;" src="" /><br />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">背景图片</label>
				<div class="col-sm-5">
					<input type="hidden" value="" name="bgimgurl" class="specialbg">
					<div class="iframe-box btn-blue">
						<iframe id="upiframe1" frameborder="0"  scrolling="no" src="{$_URL}Ups/upone?method=specialbg&classname=specialbg&callback=specialbgback"></iframe>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">视频URL</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="videourl" value="">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">推荐</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="recommend1" name="recommend" value="1">
						<label for="recommend1">是</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="recommend2" name="recommend" value="0" checked>
						<label for="recommend2">否</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">介绍</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="description"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">专题模板</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="template"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">seo meta关键词</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="metakeywords"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">seo meta描述</label>
				<div class="col-sm-5">
					<textarea class="form-control" name="metadescription"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">状态</label>
				<div class="col-sm-5">
					<div class="radio radio-inline">
						<input type="radio" id="status1" name="status" value="1" checked>
						<label for="status1">开启</label>
					</div>
					<div class="radio radio-inline">
						<input type="radio" id="status2" name="status" value="0">
						<label for="status2">关闭</label>
					</div>
				</div>
			</div>
			<div class="form-group">
			<div class="col-sm-offset-2 col-sm-5">
				<input type="button" class="btn btn-block btn-blue sub" name="name" value="提交">
			</div>
		</div>
		</form>
	</div>
</div>
<script type="text/javascript">
var _URL='{$_URL}';
{literal}
function specialbgback(data){
	var classname=data.classname;
	$('.'+classname).val(data.img);
	$('.img_show_hide2').show();
	$('.show_'+classname).attr('src',data.imgshow);
}
function specialback(data){
	var classname=data.classname;
	$('.'+classname).val(data.img);
	$('.img_show_hide1').show();
	$('.show_'+classname).attr('src',data.imgshow);
}
$(function(){
	$('.sub').click(function(){
		var url=_URL+"Special/add";
		var formjquery=_ajaxs.from('#frm');
		_ajaxs.post(url,'formjquery='+formjquery,function _result(data){
			ajax_status=true;
			layer.msg(data.msg,{icon: 1}, function(){
				if(data.status){
					window.location.href=_URL+"Special/lists";
				}
			});
		});
	})
})
{/literal}
</script>
</body>
</html>
